/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author lzw
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { ctxPath, adminPath } = useGlobSetting();

export interface CaseRegister extends BasicModel<CaseRegister> {
  name?: string; // 姓名
  phone?: string; // 电话
  ps?: string; // 备注信息
  registrant?: string; // 登记人
  registrantId?: string; // 登记人id
  mediator?: string; // 调解员
  mediatorId?: string; // 调解员id
}

export const caseRegisterList = (params?: CaseRegister | any) =>
  defHttp.get<CaseRegister>({ url: adminPath + '/operating/caseRegister/list', params });

export const caseRegisterListData = (params?: CaseRegister | any) =>
  defHttp.post<Page<CaseRegister>>({ url: adminPath + '/operating/caseRegister/listData', params });

export const caseRegisterForm = (params?: CaseRegister | any) =>
  defHttp.get<CaseRegister>({ url: adminPath + '/operating/caseRegister/form', params });

export const caseRegisterSave = (params?: any, data?: CaseRegister | any) =>
  defHttp.postJson<CaseRegister>({ url: adminPath + '/operating/caseRegister/save', params, data });

export const caseRegisterDelete = (params?: CaseRegister | any) =>
  defHttp.get<CaseRegister>({ url: adminPath + '/operating/caseRegister/delete', params });

export const caseRegisterlingqu = (params?: CaseRegister | any) =>
  defHttp.get<CaseRegister>({ url: adminPath + '/operating/caseRegister/lingqu', params });
